package com.example.system.controller;

import com.example.common.Result;
import com.example.system.entity.Orderdoctor;
import com.example.system.service.IOrderdoctorService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.stereotype.Controller;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author baomidou
 * @since 2023-05-03
 */
@RestController
@RequestMapping("/system/orderdoctor")
@CrossOrigin
public class OrderdoctorController {
@Autowired
    private IOrderdoctorService orderdoctorService;
@PostMapping("/update")
    public Result<Orderdoctor> updataOrder(@RequestBody Orderdoctor order){
    Boolean data = orderdoctorService.save(order);
    if(data==true) {
        return new Result<>(200, "修改成功", order);
    }
    return new Result<>(500, "修改失败", order);
}
}
